package com.kimoge.spring6.ioc.resource.controller;

import com.kimoge.spring6.ioc.resource.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;

/**
 * @author kimoge
 * @date 2025/8/25
 * @description
 */
@Controller(value = "myUserController")
public class UserController {
    @Resource(name = "myUserService")
    private UserService userService;

    public void sayHello() {
        System.out.println("userController sayHello");
        userService.sayHello();
    }
//    @Resource(name = "myUserService")
    public void setUserService(UserService userService) {
        this.userService = userService;
    }
}
